//
//  TitleCell.m
//  MyTrip
//
//  Created by zhang on 15/8/22.
//  Copyright (c) 2015年 张益. All rights reserved.
//

#import "TitleCell.h"
#import "UIImageView+WebCache.h"

@implementation TitleCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLabel = [[[UILabel alloc] initWithFrame:CGRectMake(10 * OffWidth, 0, 100 * OffWidth, 30 * OffHeight)] autorelease];
        [self.contentView addSubview:_titleLabel];
        _titleLabel.font = [UIFont systemFontOfSize:14];
        
        self.titleImageView = [[[UIImageView alloc] initWithFrame:CGRectMake(5 * OffWidth, 35 * OffHeight, (375 - 10) * OffWidth, 150 * OffHeight)] autorelease];
        [self.contentView addSubview:_titleImageView];
    }
    return self;
}

- (void)setValueWithDic:(NSDictionary *)dic{
    [self.titleLabel setText:@"抢特价折扣"];
    [self.titleImageView sd_setImageWithURL:[dic objectForKey:@"photo"] placeholderImage:[UIImage imageNamed:@"zhanweitu.jpg"]];
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
